#region Using

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;

using Gizmox.WebGUI.Common;
using Gizmox.WebGUI.Forms;

#endregion

namespace BusinessNuke.ImportBusiness.Web.Categories.Business
{
    public partial class ImportInfoForm : Form
    {
        private int InfoId;
        public ImportInfoForm()
        {
            InitializeComponent();
        }
        public ImportInfoForm(int id)
        {
            InitializeComponent();
            InfoId = id;
        }

        private void ImportInfoForm_Load(object sender, EventArgs e)
        {
            if (InfoId > 0)
            {
                AddImportInfoControl control = new AddImportInfoControl(InfoId);
                control.SaveSuccessed += (o, ev) => { Close(); };
                control.Dock = DockStyle.Fill;
                this.Controls.Add(control);
            }
            else
            {
                AddImportInfoControl control = new AddImportInfoControl();
                control.SaveSuccessed += (o, ev) => { Close(); };
                control.Dock = DockStyle.Fill;
                this.Controls.Add(control);
            }
        }
    }
}